const mongoose = require("../db/db")

const commentSchema = mongoose.Schema(
  {
    content: {
      type: String,
      required: true
    },
    username: String
  },
  { timestamps: true }
) // 时间戳，自动添加文档的创建时间、更新时间
const Comment = mongoose.model("comments", commentSchema)

module.exports = Comment
